--
-- Author: yawei.zhu
-- Date: 2019-01-12 16:15:28
--
-- DungeonPassAwardView
--
local IconRender = require("app.widget.renders.IconRender")

local fileName = string.getModeName(...)
local ClassRef = class(fileName, app.mvc.ViewBase)

ClassRef.VIEW_ROOT_RES = Res.DungeonPassAwardScene

function ClassRef:init()
	self._ui.Button_close:addClickEventListener(function()
		self:closeView()
	end)

	self._render = IconRender.create(self._ui.icon_1)
	self._render:setTipEnable(true)
end

function ClassRef:updateView(point, name, iconPath)
	self._ui.tips_1:setString(name)
	self._ui.icon:loadTexture(Res.dungeonIconPath .. iconPath .. ".png")
	local itemData = UD:parseRewardToBagItem("121|0|"..point)
	self._render:setData(itemData)
end

return ClassRef
